#ifndef LIMITTEXTEDIT_H
#define LIMITTEXTEDIT_H

#include <QWidget>
#include <QTextDocument>
#include <QTextBlock>
#include <QDebug>

namespace Ui {
class LimitTextEdit;
}

class LimitTextEdit : public QWidget
{
    Q_OBJECT

public:
    explicit LimitTextEdit(QWidget *parent = nullptr);
    ~LimitTextEdit();

    QString content();

    void setMaxWordNum(const int maxNum);

    void setTitle(const QString& title);

    void setContent(const QString& content);

private slots:
    void slot_handleInput();

private:
    Ui::LimitTextEdit *ui;
    int m_maxWordNum;
};

#endif // LIMITTEXTEDIT_H
